package com.dev.security.manager.beans;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author 潜行的青衣
 * @see
 */
@Entity
@Table(name = "t_cds_accountroleunit")
public class AccountRoleUnit {

	@EmbeddedId
	private AccountRoleUnitId id;
	
	public AccountRoleUnit() {}
	
	public AccountRoleUnit(AccountRoleUnitId id) {
		this.id = id;
	}
	
	@ManyToOne
	@JoinColumn(name="role_id", insertable=false, updatable=false)
	private Role role;

	public AccountRoleUnitId getId() {
		return id;
	}

	public void setId(AccountRoleUnitId id) {
		this.id = id;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}
	
}
